{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's define some class."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "class A {\n",
    "    public void hello() {\n",
    "        System.out.println(\"Hello World\");\n",
    "    }   \n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And now we call its method."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "new A().hello();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "You can run it e.g. with `jshell`\n",
    "\n",
    "* from command line, as `jshell simple-helloworld.java`\n",
    "* from jshell's shell with `/open simple-helloworld.java`"
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "encoding": "// -*- coding: utf-8 -*-",
   "formats": "ipynb,java:light"
  },
  "kernelspec": {
   "display_name": "Java",
   "language": "java",
   "name": "java"
  },
  "language_info": {
   "codemirror_mode": "text/x-java",
   "file_extension": ".java",
   "mimetype": "",
   "name": "Java",
   "nbconverter_exporter": "",
   "version": "1.8.0_121"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
